package com.lineage.server.command.executor;

import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.serverpackets.S_PacketBoxIcon1;
import com.lineage.server.serverpackets.S_SystemMessage;
import com.lineage.server.serverpackets.ServerBasePacket;
import java.util.StringTokenizer;

public class L1SkillIcon3 implements L1CommandExecutor {
  public static L1CommandExecutor getInstance() {
    return new L1SkillIcon3();
  }
  
  public void execute(L1PcInstance pc, String cmdName, String arg) {
    try {
      StringTokenizer st = new StringTokenizer(arg);
      int type = 0;
      if (st.hasMoreTokens())
        type = Integer.parseInt(st.nextToken()); 
      int i = 0;
      while (i < type) {
        pc.sendPackets((ServerBasePacket)new S_PacketBoxIcon1(i, 10));
        i++;
      } 
    } catch (Exception e) {
      pc.sendPackets((ServerBasePacket)new S_SystemMessage(String.valueOf(String.valueOf(cmdName)) + " Skillicon 请输入 id 编码。"));
    } 
  }
}
